package com.algomypractice.stack;

import com.sourcestruct.linearlist.ArrayStack;

/**
 * @author: ZhouBert
 * @date: 2019/6/7
 * @description:	简单浏览器模仿前进后退
 */
public class SimpleBrowser {

	public static void main(String[] args) {
		ArrayStack<Integer> x=new ArrayStack<>(10);
		ArrayStack<Integer> y=new ArrayStack<>(10);
		//网页记录
		x.push(1);
		x.push(2);
		x.push(3);

		//后退一次
		y.push(x.pop());
		System.out.println(x);
		System.out.println(y);
		//前进一次
		x.push(y.pop());
		System.out.println(x);
		System.out.println(y);


	}


}
